package com.zjh.controller;


import com.baomidou.mybatisplus.extension.api.R;
import com.zjh.entity.Users;
import com.zjh.service.UsersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "用户端控制器")
@RestController
@RequestMapping("/user")
public class UserController {


    @Autowired
    UsersService usersService;

    @ApiOperation("查询所有用户")
    @GetMapping("all")
    public R<List<Users>> getAllUser()
    {
        List<Users> users = usersService.list();
        return R.ok(users);
    }

}
